package com.atguigu.gmall.search.dao;

import com.atguigu.gmall.search.bean.Person;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author dyqstart
 * @create 2021-08-13-18:54
 * @since 1.0.0
 */
public interface PersonEsDao extends ElasticsearchRepository<Person,Long> {

    //springdata 起名只要起名就行
    List<Person> findAllByAgeBetween(Integer age1,Integer age2);

    //18-20之间或者名字叫田七的人
    List<Person> findAllByAgeBetweenAndNameEquals(Integer age1,Integer age2,String name);


    List<Person> findAllByAddressLike(String address);
}
